#ifndef GAME_CUTSCENE_H
#define GAME_CUTSCENE_H

#include "game_asset.h"
// 【infinity】 n. 无限大, 无限 [计] 无穷
enum scene_layer_flags {
    SceneLayerFlag_AtInfinity = 1 << 0,
    SceneLayerFlag_CounterCameraX = 1 << 1,
    SceneLayerFlag_CounterCameraY = 1 << 2,
    SceneLayerFlag_Transient = 1 << 3,
    SceneLayerFlag_Floaty = 1 << 4,
};

struct scene_layer {
    v3 P;
    real32 Height;
    uint32 Flags;
    v2 Param;
};

struct layered_scene {
    assets_type_id AssetType;
    uint32 ShotIndex;
    uint32 LayerCount;
    scene_layer* Layers;

    real32 Duration;
    v3 CameraStart;
    v3 CameraEnd;

    real32 tFadeIn;
};
enum cutscene_id {
    CutsceneID_Intro,
};

struct game_mode_cutscene {
    cutscene_id ID;
    real32 t;
};

struct game_mode_attract {
    real32 t;
};

struct game_mode_title_screen {
    real32 t;
};

struct game_state;
struct render_group;
struct game_mode_world;

void PlayIntroCutscene(game_state* GameState, transient_state* TranState);
void PlayTitleScreen(game_state* GameState, transient_state* TranState);
bool32 UpdateAndRenderTitleScreen(game_state* GameState, transient_state* TranState,
                                  render_group* RenderGroup, loaded_bitmap* DrawBuffer,
                                  game_mode_title_screen* TitleScreen,  //
                                  game_input* Input);
bool32 UpdateAndRenderCutscene(game_state* GameState, transient_state* TranState,
                               render_group* RenderGroup, loaded_bitmap* DrawBuffer,
                               game_input* Input, game_mode_cutscene* CutScene);
bool32 CheckForMetaInput(game_state* GameState, transient_state* TranState, game_input* Input);
#endif